<%@page import="java.util.function.Function"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>


<head>
<script type="text/javascript">



/*验证 不为空 */
 function  CheckUser(){
	var username=document.getElementById("name").value;
	var password=document.getElementById("password").value;
	var qepassword=document.getElementById("qepassword").value;
	
	if(username.length<=0){
		alert("用户名不为空");
		return false;
	}
	
	if(password.length<=0){
		alert("密码不为空");
		return false;
	}
	
	if(qepassword.length<=0){
		alert("确认密码不为空");
		return false;
	}
	
	if(password!=qepassword){
		alert("密码不一致，请重新输入");	
		return false;
	
	}
	  var boxv=document.getElementsByName("newspaper");
	var boxvv="";
	 for(var i=0;i<4;i++)
	{
	if(boxv[i].checked)
	{
	boxvv=boxv[i].value;
	}
	}
	
	if(boxvv=="")
	{
		alert("没有选择信息来源，请选择！");	
	    return false;
	} 
	 
	return true;
}




</script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>用户注册</title>
</head>
<body>
	<form id="form1" action="RegisterInfo.jsp" method="post"  onsubmit="return  CheckUser()" >
		<h1 style="text-align: center; font-size: 20px">请输入注册信息</h1>

		<div class="regist" style="text-align: center;">
			姓 名： <input type="text" name="name"  id="name"
				style="width: 300px; height: 25px;" /><span style="color: red;">*</span><br><br>
			 密 码： <input type="password" name="password" id="password"
				style="width: 300px; height: 25px;" /><span style="color: red;">*</span><br> <br>
				
	确 认 密码： <input type="password" name="qepassword"  id="qepassword"
				style="width: 300px; height: 25px; margin-left: -35px" /><span style="color: red;">*</span><br> <br>	
				
			 信息来源 <input type="checkbox" id="newspaper" name="newspaper"
				value="报纸" />报纸 <input type="checkbox" id="newspaper" name="newspaper" value="网络" />网络
			<input type="checkbox" id="newspaper" name="newspaper" value="朋友推荐 " /> 朋友推荐 <input
				type="checkbox" id="newspaper" name="newspaper" value="电视  " />电视 <br> <br>
				
			<input type="submit" value="提交"
				style="width: 100px; height: 40px; background: #00FFFF; font-size: 18px;" >
		</div>
	</form>
</body>
</html>